<!--考试申请-->
<template>
    <div>
        <!-- 面包屑导航 -->
            <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/index' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>考试申请</el-breadcrumb-item>
            </el-breadcrumb>
             <div style="margin: 10px auto;"></div>
            <el-alert
                title="用户提交的考试申请,请快速处理！"
                type="success">
            </el-alert>
             <div style="margin: 10px auto;"></div>
            <el-button type="danger"   @click="findDate()">刷新</el-button>
             <div style="margin: 10px auto;"></div>
            <el-table size="small" empty-text="暂时没有申请"  style="width: 100%" :data="listDate" highlight-current-row v-loading="loading"  element-loading-text="拼命加载中" >
                
                <el-table-column
                    width="200"
                prop="username"
                label="姓名">
                </el-table-column>

                <el-table-column
                    width="200"
                prop=""
                label="头像">
                <template slot-scope="scope">
                        <el-avatar :size="50" :src="scope.row.url"></el-avatar>
                </template>
                </el-table-column>

                <el-table-column
                    width="200"
                prop="tel"
                label="电话">
                </el-table-column>
               
               <el-table-column
                    width="200"
                prop="idCard"
                label="身份证号">
                </el-table-column>

               <el-table-column
                    width="200"
                prop="testStatus"
                label="申请考试科目">
                <template slot-scope="scope">
                        <el-tag type="success">科目{{scope.row.testStatus}}</el-tag>
                </template>
                </el-table-column>

               
               <el-table-column align="center" label="操作" >
                    <template slot-scope="scope">
                    <el-button type="danger" size="mini" icon="el-icon-edit" @click="pass(scope.row.id)">考试通过</el-button>
                    </template>
                </el-table-column>
                


           
           
            </el-table>

    </div>
</template>
<script>
export default {
    data() {
        return {
            listDate:[],
            loading:false
        }
    },
    created(){
        this.findDate();
    },
    methods: {
        findDate(){
            this.MyLoading();
            this.$api.get("/subject/token/findUserShenQingByAdmin","",res=>{
                    this.listDate  =  res.data.data;
            })
        },
        pass(id){
            this.$api.post("/subject/token/UserPassShenQingByAdmin",{"id":id},res=>{
                    this.findDate();
            })
        },
         MyLoading(){
            this.loading =true;
            setTimeout(()=>{
                this.loading =false
            },500)
        },
        
    },
}
</script>
<style scoped>

</style>